gen dob = mdy(dob_month, dob_day, dob_year)
format dob %tdnn/dd/CCYY

drop dob_month dob_day dob_year

gen z = .
gen cutyr=.

forvalues yr=1970/2017 {
	replace z = dob-mdy(1,1,`yr') if inrange(dob,mdy(7,1,`yr'-1),mdy(6,30,`yr'))
	replace cutyr = `yr' if inrange(dob,mdy(7,1,`yr'-1),mdy(6,30,`yr'))
}
gen taxyr_cut = cutyr-1

gen belowcut = (z<0)
replace belowcut = . if z==.
